#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2016-04-08 16:04:19
# @Author  : Gtlions Lai (gtlions.l@qq.com)
# @Link    : http://blog.csdn.net/gtlions
# @Version : 1.0.0
"""summarization ahout this script.

detail ahout this script

    Class(): summarization about Class
    ...
    function(): summarization about function
    ...
"""

import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
# from models import User

app = Flask(__name__)
# dbfile = os.path.join(app.instance_path, '../sqlalchemy.db')
# print dbfile
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:////Users/gtlions/gtlions/baidusync/laisync/10DevSpaces/pycharm/Misc/sqlalchemy/sqlalchemy.db'
db = SQLAlchemy(app)

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(80), unique=True)
    email = db.Column(db.String(120), unique=True)

    def __init__(self, username, email):
        self.username = username
        self.email = email

    def __repr__(self):
        return '<User %r>' % self.username

